<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
 String path = request.getContextPath();
 String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <base href="<%=basePath%>">
  <title>验证码</title>
  <meta http-equiv="pragma" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache">
  <meta http-equiv="expires" content="0">
 </head>

 <body>
  <script type="text/javascript">
	 function show(o) {
	  // 重新载入验证码
	  var timenow = new Date().getTime();
	  o.src = "validatecode?d=" + timenow;
	 }
</script>
  验证码：
  <div>${validatecode}</div>
  <img src="validatecode" name="rand" id="rand" />
  <a
   href="javascript:show(document.getElementById('rand'))">看不清?</a>
 </body>
</html>